#include "exception.h"

namespace herm{

Exception::Exception(const std::string& file, int line, const std::string& func, 
	int type, int code, const std::string& desc)
{
	std::ostringstream oss(desc);
	oss << "{" << file << ":" << line << " " << func << "} ";
	oss << "type: " << type << "; code: " << code;
	oss << ";" << desc;
	m_desc = oss.str();
	m_type = type;
	m_code = code;
}

std::string Exception::Desc() const 
{
	return m_desc;
}

int Exception::Type() const
{
	return m_type;
}

int Exception::Code() const
{
	return m_code;
}
} // end namespace herm{
